|
Elias gamma code is a universal code encoding positive integers developed by Peter Elias. It is used most commonly when coding integers whose upper-bound cannot be determined beforehand. ==Encoding== To code a number ''x''≥1: # Let ''N''=⌊log2 ''x''⌋ be the highest power of 2 it contains, so 2''N'' ≤ ''x'' < 2''N''+1. # Write out ''N'' zero bits, then # Append the binary form of ''x'', an ''N''+1-bit binary number. An equivalent way to express the same process: # Encode ''N'' in unary; that is, as ''N'' zeroes followed by a one. # Append the remaining ''N'' binary digits of ''x'' to this representation of ''N''. To represent a number , Elias gamma uses bits.〔 The code begins (the implied probability distribution for the code is added for clarity): 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Elias gamma coding」の詳細全文を読む スポンサード リンク
|